//
// Created by Martin on 2021/9/29.
//

#ifndef DESIGNPATTERN_CPP_CASHRETURN_H
#define DESIGNPATTERN_CPP_CASHRETURN_H

#include "CashSuper.h"
#include <string>

/**
 * 返利收费
 * e.g. 消费满300返100
 */
class CashReturn : public CashSuper{
public:
    explicit CashReturn(double moneyCondition, double moneyReturn);
    double acceptCash(double money) override;

private:
    double moneyCondition = 300; // 消费满条件
    double moneyReturn = 100; // 返利
};


#endif //DESIGNPATTERN_CPP_CASHRETURN_H
